﻿using BoriPeter.FatSecret.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BoriPeter.FatSecret.Messages
{
    /// <summary>
    /// Records a food diary entry for the user according to the parameters specified.
    /// </summary>
    public class FoodEntryCreate : FatSecretMessageBase<FoodEntryCreateModel>
    {
        private const string METHOD_VALUE = "food_entry.create";
        private const string FOOD_ID = "food_id";
        private const string FOOD_ENTRY_NAME = "food_entry_name";
        private const string SERVING_ID = "serving_id";
        private const string NUMBER_OF_UNITS = "number_of_units";
        private const string MEAL = "meal";
        private const string DATE = "date";

        public FoodEntryCreate(int _foodId, string _foodEntryName, int _servingId, decimal _numberOfUnits, DateTime _date, string _meal) : base()
        {
            AddRequestParameter(METHOD, METHOD_VALUE);
            AddRequestParameter(FOOD_ID, _foodId);
            AddRequestParameter(FOOD_ENTRY_NAME, _foodEntryName);
            AddRequestParameter(SERVING_ID, _servingId);
            AddRequestParameter(NUMBER_OF_UNITS, _numberOfUnits);
            AddRequestParameter(DATE, _date);
            AddRequestParameter(MEAL, _meal);
        }
    }
}
